package com.atguigu.lease.common.context;

public class LoginUserContext {
    static ThreadLocal<LoginUser> loginUserThreadLocal = new ThreadLocal<>();

    public static void setLoginUser(LoginUser loginUser) {
        loginUserThreadLocal.set(loginUser);
    }

    public static LoginUser getLoginUser() {
        LoginUser loginUser = loginUserThreadLocal.get();
        return loginUser;
    }

    public static void removeLoginUser() {
        loginUserThreadLocal.remove();
    }


}
